package com.yunfei.fegin;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.concurrent.TimeUnit;

/**
* @Description:  定义一个feign接口，通过@ FeignClient（“服务名”），来指定调用哪个服务。比如在代码中调用了service-hi服务的“/hi”接口，代码如下：
 * Feign中使用断路器：只需要在FeignClient的SchedualServiceHi接口的注解中加上fallback的指定类就行了
* @Author: zhengyunfei q群号:541122375
* @Date: 2018/7/3  
* @time:11:05
*/
@FeignClient(value="app-file-center",fallback = RedisServiceHystric .class)
public interface AppFileService {

    @RequestMapping(value = "/api/upload",method = RequestMethod.POST)
    String saveCardPic(@RequestParam(value = "request", required = true) HttpServletRequest request,@RequestParam(value = "uploadType", required = false) String uploadType,@RequestParam(value = "reasonCode2", required = false) String reasonCode2);


}
